import request from '@/utils/request'

interface StockListRes {
  total: number
  data: Array<{
    id: number
    userId: string
    merchandiseId: number
    quantity: number
    createdAt: string
    updatedAt: string
    deletedAt: null
    merchandise: {
      name: string
      price: number
      imgUrl: string
    }
  }>
}
export function getStockList(params): Promise<any> {
  return request.get<StockListRes>('/stock/getStockList', { params })
}
export function getStockDetail(params): Promise<any> {
  return request.get<StockListRes>('/stock/getStockDetail', { params })
}
